/**
 * @mbggenerated
 * @author wujian
 */
package bearworker.zxl.dao.mapper;

import bearworker.zxl.entity.WxInterfaceLog;
import org.apache.ibatis.jdbc.SQL;

public class WxInterfaceLogSqlProvider {

    /* @mbggenerated */
    public String insertSelective(WxInterfaceLog record) {
        return new SQL() {
            {
                INSERT_INTO("wx_interface_log");

                if (record.getId() != null) {
                    VALUES("id", "#{id,jdbcType=INTEGER}");
                }

                if (record.getSignature() != null) {
                    VALUES("signature", "#{signature,jdbcType=VARCHAR}");
                }

                if (record.getOpenid() != null) {
                    VALUES("openid", "#{openid,jdbcType=VARCHAR}");
                }

                if (record.getNonce() != null) {
                    VALUES("nonce", "#{nonce,jdbcType=VARCHAR}");
                }

                if (record.getTimestamp() != null) {
                    VALUES("timestamp", "#{timestamp,jdbcType=VARCHAR}");
                }

                if (record.getCreateTime() != null) {
                    VALUES("create_time", "#{createTime,jdbcType=TIMESTAMP}");
                }

                if (record.getBodystr() != null) {
                    VALUES("bodyStr", "#{bodystr,jdbcType=LONGVARCHAR}");
                }

            }
        }.toString();
    }

    /* @mbggenerated */
    public String updateByPrimaryKeySelective(WxInterfaceLog record) {
        return new SQL() {
            {
                UPDATE("wx_interface_log");

                if (record.getSignature() != null) {
                    SET("signature = #{signature,jdbcType=VARCHAR}");
                }

                if (record.getOpenid() != null) {
                    SET("openid = #{openid,jdbcType=VARCHAR}");
                }

                if (record.getNonce() != null) {
                    SET("nonce = #{nonce,jdbcType=VARCHAR}");
                }

                if (record.getTimestamp() != null) {
                    SET("timestamp = #{timestamp,jdbcType=VARCHAR}");
                }

                if (record.getCreateTime() != null) {
                    SET("create_time = #{createTime,jdbcType=TIMESTAMP}");
                }

                if (record.getBodystr() != null) {
                    SET("bodyStr = #{bodystr,jdbcType=LONGVARCHAR}");
                }

                WHERE("id = #{id,jdbcType=INTEGER}");

            }
        }.toString();
    }
}